---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/Ohio-HallResearch/Code/replication/table9.log
  log type:  text
 opened on:  11 Jun 2020, 11:23:27

. 
. use "$path/foreclosures_leg_analysis.dta", clear

. 
. 
. *** Table on legislative effects using foreclosure rate within six months of election
. 
. foreach j in sen cong {
  2. 
.         bootstrap _b, rep(1e3) seed(94305) cluster(fips) force: reghdfe `j'_vs foreclosure_rate_six foreclosure_inc_six [aw=pop_y], a(fips sy) cluster(fips)
  3.         local `j'b1 = _b[foreclosure_rate_six]
  4.         local `j'se1 = _se[foreclosure_rate_six]
  5.         local `j'bint1 = _b[foreclosure_inc_six]
  6.         local `j'seint1 = _se[foreclosure_inc_six]
  7.         local `j'n1 = e(N)
  8.         local `j'nclust1 = e(N_clust)
  9.         
.         bootstrap _b, rep(1e3) seed(94305) cluster(fips) force: reghdfe `j'_vs foreclosure_rate_six foreclosure_inc_six [aw=pop_y], a(fips popyear) cluster(fips)
 10.         local `j'b2 = _b[foreclosure_rate_six]
 11.         local `j'se2 = _se[foreclosure_rate_six]
 12.         local `j'bint2 = _b[foreclosure_inc_six]
 13.         local `j'seint2 = _se[foreclosure_inc_six]
 14.         local `j'n2 = e(N)
 15.         local `j'nclust2 = e(N_clust)
 16.         
.         bootstrap _b, rep(1e3) seed(94305) cluster(fips) force: reghdfe `j'_vs foreclosure_rate_six foreclosure_inc_six [aw=pop_y], a(i.fips##c.year sy) cluster(fips)
 17.         local `j'b3 = _b[foreclosure_rate_six]
 18.         local `j'se3 = _se[foreclosure_rate_six]
 19.         local `j'bint3 = _b[foreclosure_inc_six]
 20.         local `j'seint3 = _se[foreclosure_inc_six]
 21.         local `j'n3 = e(N)
 22.         local `j'nclust3 = e(N_clust)
 23.         
.         bootstrap _b, rep(1e3) seed(94305) cluster(fips) force: reghdfe `j'_vs foreclosure_rate_six foreclosure_inc_six [aw=pop_y], a(i.fips##c.year popyear) cluster(fips)
 24.         local `j'b4 = _b[foreclosure_rate_six]
 25.         local `j'se4 = _se[foreclosure_rate_six]
 26.         local `j'bint4 = _b[foreclosure_inc_six]
 27.         local `j'seint4 = _se[foreclosure_inc_six]
 28.         local `j'n4 = e(N)
 29.         local `j'nclust4 = e(N_clust)
 30. 
. }
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     11,927
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =      19.04
                                                Prob > chi2       =     0.0001
                                                R-squared         =     0.9711
                                                Adj R-squared     =     0.9616
                                                Root MSE          =     3.8749

                                        (Replications based on 2,691 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
              sen_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -.8196839   .1984581    -4.13   0.000    -1.208655   -.4307132
 foreclosure_inc_six |  -.1048609   .1494506    -0.70   0.483    -.3977788     .188057
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2691           2691 *   | 
                  sy |          264             265              1     | 
-----------------------------------------------------------------------+
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     11,927
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =      11.56
                                                Prob > chi2       =     0.0031
                                                R-squared         =     0.7425
                                                Adj R-squared     =     0.6645
                                                Root MSE          =    11.4579

                                        (Replications based on 2,691 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
              sen_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -1.450323   .4904932    -2.96   0.003    -2.411672   -.4889738
 foreclosure_inc_six |  -.7521373   .4605021    -1.63   0.102    -1.654705    .1504303
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2691           2691 *   | 
             popyear |           79              80              1     | 
-----------------------------------------------------------------------+
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     11,927
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       7.99
                                                Prob > chi2       =     0.0184
                                                R-squared         =     0.9862
                                                Adj R-squared     =     0.9739
                                                Root MSE          =     3.1988

                                        (Replications based on 2,691 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
              sen_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -.5580938   .2368289    -2.36   0.018     -1.02227   -.0939176
 foreclosure_inc_six |   -.557948    .199193    -2.80   0.005     -.948359   -.1675369
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2691           2691 *   | 
         fips#c.year |         2691            2691              0 ?   | 
                  sy |          264             265              1     | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     11,927
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       6.41
                                                Prob > chi2       =     0.0405
                                                R-squared         =     0.8426
                                                Adj R-squared     =     0.7097
                                                Root MSE          =    10.6590

                                        (Replications based on 2,691 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
              sen_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -1.630442   .6796116    -2.40   0.016    -2.962456   -.2984278
 foreclosure_inc_six |  -.0825121   .5813026    -0.14   0.887    -1.221844     1.05682
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2691           2691 *   | 
         fips#c.year |         2691            2691              0 ?   | 
             popyear |           79              80              1     | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     17,792
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       7.32
                                                Prob > chi2       =     0.0257
                                                R-squared         =     0.8514
                                                Adj R-squared     =     0.8189
                                                Root MSE          =     9.0120

                                        (Replications based on 2,799 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
             cong_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -.7038317   .2771515    -2.54   0.011    -1.247039   -.1606247
 foreclosure_inc_six |   .1786591    .199982     0.89   0.372    -.2132984    .5706165
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2799           2799 *   | 
                  sy |          391             392              1     | 
-----------------------------------------------------------------------+
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     17,792
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       0.15
                                                Prob > chi2       =     0.9264
                                                R-squared         =     0.8209
                                                Adj R-squared     =     0.7863
                                                Root MSE          =     9.7905

                                        (Replications based on 2,799 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
             cong_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |   .0399218   .2349652     0.17   0.865    -.4206015    .5004452
 foreclosure_inc_six |  -.0452281   .1662942    -0.27   0.786    -.3711587    .2807026
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2799           2799 *   | 
             popyear |           79              80              1     | 
-----------------------------------------------------------------------+
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     17,792
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       3.28
                                                Prob > chi2       =     0.1942
                                                R-squared         =     0.9046
                                                Adj R-squared     =     0.8561
                                                Root MSE          =     8.0327

                                        (Replications based on 2,799 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
             cong_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |  -.0779646   .2557462    -0.30   0.760    -.5792179    .4232887
 foreclosure_inc_six |   .3229615   .1817933     1.78   0.076    -.0333469    .6792699
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2799           2799 *   | 
         fips#c.year |         2799            2799              0 ?   | 
                  sy |          391             392              1     | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation
(running reghdfe on estimation sample)

Bootstrap replications (1000)
----+--- 1 ---+--- 2 ---+--- 3 ---+--- 4 ---+--- 5 
..................................................    50
..................................................   100
..................................................   150
..................................................   200
..................................................   250
..................................................   300
..................................................   350
..................................................   400
..................................................   450
..................................................   500
..................................................   550
..................................................   600
..................................................   650
..................................................   700
..................................................   750
..................................................   800
..................................................   850
..................................................   900
..................................................   950
..................................................  1000

HDFE Linear regression                          Number of obs     =     17,792
Absorbing 2 HDFE groups                         Replications      =      1,000
                                                Wald chi2(2)      =       2.75
                                                Prob > chi2       =     0.2531
                                                R-squared         =     0.8882
                                                Adj R-squared     =     0.8358
                                                Root MSE          =     8.5825

                                        (Replications based on 2,799 clusters in fips)
--------------------------------------------------------------------------------------
                     |   Observed   Bootstrap                         Normal-based
             cong_vs |      Coef.   Std. Err.      z    P>|z|     [95% Conf. Interval]
---------------------+----------------------------------------------------------------
foreclosure_rate_six |   .1897645   .2331311     0.81   0.416     -.267164    .6466929
 foreclosure_inc_six |   .2306806   .1429526     1.61   0.107    -.0495014    .5108626
--------------------------------------------------------------------------------------

Absorbed degrees of freedom:
-----------------------------------------------------------------------+
         Absorbed FE |  Num. Coefs.  =   Categories  -   Redundant     | 
---------------------+-------------------------------------------------|
                fips |            0            2799           2799 *   | 
         fips#c.year |         2799            2799              0 ?   | 
             popyear |           79              80              1     | 
-----------------------------------------------------------------------+
? = number of redundant parameters may be higher
* = fixed effect nested within cluster; treated as redundant for DoF computation

. 
. log close
      name:  <unnamed>
       log:  /Users/jesse/Dropbox/Ohio-HallResearch/Code/replication/table9.log
  log type:  text
 closed on:  11 Jun 2020, 12:10:25
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
